package tg.app.rj.workorder;


import psdi.mbo.MAXTableDomain;
import psdi.mbo.MboValue;
import psdi.util.MXException;

/****
 * 
 * @author pzx
 *
 */
public class CustFldPersonid
  extends MAXTableDomain
{
  public CustFldPersonid(MboValue mbv)
    throws MXException
  {
    super(mbv);
    String thisAttr = getMboValue().getAttributeName();
    setRelationship("PERSON", "PERSONID=:" + thisAttr);
    String code = getMboValue().getColumnTitle();
    setListCriteria("status in (select value from synonymdomain where maxvalue='ACTIVE' and domainid='PERSONSTATUS')");
    String[] FromStr = { "PERSONID" };
    String[] ToStr = { thisAttr };
    setLookupKeyMapInOrder(ToStr, FromStr);
    setErrorMessage("person", "InvalidPerson");
  }
  
}
